//////////////////////////////////////////////////////////////////////////
//
// GAM203
// Triangle class
// Triangle.h
// 
// Grant Johnson
// Qantm College
//
//////////////////////////////////////////////////////////////////////////
#ifndef TRIANGLE_H
#define TRIANGLE_H

#include "Drawable.h"

#include <d3d9.h>
#include <d3d9types.h>

class Triangle : public Drawable
{
public:
	//Struct used to define the type of vertices
	struct VertexData
	{
		//Vertices have a position and a colour
		D3DVECTOR pos;
		D3DCOLOR col;
	};

	//Define Flexible Vertex Format as a static const that is capable of a 3d position and a colour
	static const DWORD VERTEX_FORMAT_FVF = D3DFVF_XYZ | D3DFVF_DIFFUSE;

	//Virtual D'tor as it a subclass
	virtual ~Triangle();

public:
	virtual bool CreateObject(IDirect3DDevice9* a_pDevice, char* a_pTexFileName);
	virtual void Render(float a_dt, IDirect3DDevice9* a_pDevice, const RenderParams& a_renderParams);
};

#endif //TRIANGLE_H